home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-02-02 | 1.2 KB | 66 lines | [TEXT/ttxt] |
- NetLink and 4D example code follows:
-
- To use these procedures, you must add the following lines to the beginning
- of your main NetLink procedure (the one called when a request is received):
-
- ---4D code follows
- c_longint(procid)
- c_text(txt_html)
-
- procid=$1
- txt_html:=""
- --end 4D code
-
- You will also need to add the command:
-
- NL_AppendReply(procid;txt_html)
-
- as the last line of the main procedure mentioned above.
-
- --start example code
-
- `Procedure "Reply"
- `
- `Stewart Van Buskirk, 1996
- `
- `This procedure replaces the "NL_AppendReply"
- `command in 4D code and makes including inline
- `HTML much easier and a bit faster.
- `
- `Usage:
- `Reply(<text or string expression>)
- `
- c_text($1)
-
- if(length(txt_html+$1)>30000)
- nl_appendreply(procid;txt_html)
- txt_html:=""+$1
- else
- txt_html:=txt_html+$1
- end if
-
-
- ---start second procedure
-
- `Procedure "ReplyNow"
- `
- `Stewart Van Buskirk, 1996
- `
- `This procedure replaces the "NL_FlushReply"
- `command in 4D code when sending back an immediate
- `chunk of HTML to the client. To be used when an
- `immediate reply is required but more HTML may
- `follow.
- `
- `Usage:
- `ReplyNow(<text or string expression>)
- `
- c_text($1)
-
- nl_appendreply(procid;txt_html)
- nl_appendreply(procid;$1)
- nl_flushreply(procid;0)
- txt_html:=""
-
- ----end example code
-